package com.chengdu.third.service.Impl;

import com.chengdu.third.dao.ILawsDao;
import com.chengdu.third.pojo.Laws;
import com.chengdu.third.service.ILawsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author jingbo
 * @create 2021--08--15  21:38
 */

@Service
public class ILawsServiceImpl implements ILawsService {

    @Autowired
    private ILawsDao iLawsDao;

    @Override
    public List<Laws> findAll() {
        return iLawsDao.find();
    }

    @Override
    public void deleteByid(long id) {
      iLawsDao.delete(id);
    }

    @Override
    public void addlaws(Laws laws) {
         iLawsDao.add(laws);
    }

    @Override
    public Laws getLawsById(long id) {

        return iLawsDao.getLawsById(id);
    }

    @Override
    public void updateLawsById(Laws laws) {
        iLawsDao.update(laws);
    }
}
